package com.ihr360.payroll.service.salary.impl;

import com.ihr360.authority.sharing.annonation.AccessControl;
import com.ihr360.payroll.dao.SalaryCompanySettingRepository;
import com.ihr360.payroll.model.dto.salary.SalaryCompanySetting;
import com.ihr360.payroll.service.salary.SalaryCompanySettingService;
import com.ihr360.rest.reposity.SimpleRestReposity;
import com.ihr360.rest.service.AbstractSimpleRestServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@AccessControl(disableAll = true)
public class SalaryCompanySettingServiceImpl extends AbstractSimpleRestServiceImpl<SalaryCompanySetting, Long> implements SalaryCompanySettingService {

    @Autowired
    private SalaryCompanySettingRepository salaryCompanySettingRepository;

    @Override
    public SimpleRestReposity<SalaryCompanySetting, Long> getSimpleRestReposity() {
        return salaryCompanySettingRepository;
    }

    @Override
    public SalaryCompanySetting getSalaryCompanySetting(String companyId) {
        return salaryCompanySettingRepository.findByCompanyId(companyId);
    }

}
